#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<math.h>
#define A(i) a[i-1]
int merge(int *a,int s,int e)
{
	int i,j,k=0;
	int b[(e-s)+1];
	i=s;
	j=(s+e)/2+1;
	while(k<=(e-s))
	{
		if(j>e) 
		{
			b[k]=A(i),k++,i++;
			continue;
		}
		if(i>(s+e)/2) 
		{
			b[k]=A(j),k++,j++;
			continue;
		}
		(A(i)<A(j))?(b[k]=A(i),k++,i++):(b[k]=A(j),k++,j++);
	}
	for(i=s;i<(e+1);i++) A(i)=b[i-s];
	return 0;
}
int mergesort(int *a,int s,int e)
{
	if(s<e)
	{
		mergesort(a,s,(s+e)/2);
		mergesort(a,(s+e)/2+1,e);
		merge(a,s,e);
	}
}

int main()
{
	int i,j,k;
	int n;
	int *a;
	scanf("%d",&n);
	a=(int *)malloc(n*sizeof(int));
	for(i=0;i<n;i++) scanf("%d",&a[i]);
	mergesort(a,1,n);
	for(i=0;i<n;i++) printf("%d ",a[i]);
	printf("\n");
	return 0;
}
